<?php
/* @var $this PromotionController */

//行业一级分类
$cateTop = Category::model()->getTopCache();
//当前分类
$activeCate = Category::model()->findByPk($model->category_top);
//找不到产品的提示信息
$emptyText = '<div class="search_error"><h2 class="fs_14 ff_s">当前分类下无促销产品！</h2><p>或者您还可以：'.CHtml::link('查看全部促销',array('list','id'=>''),array('alt'=>'查看全部促销','class'=>'fw_b c_green2')).' </p></div>';
?>
    <!--更多促销 start-->
<div class="prom_more list_hover">
    <div class="prom_pub_hd bg_x"><h2 class="fs_20 ff_yh c_green2"><?php echo empty($activeCate)?'全部促销':CHtml::encode($activeCate->zca_title)?><span class="bg bg_sale"></span></h2></div>
        <div class="bd pro_list">
        	<?php   
				$this->widget('zii.widgets.CListView', array(  
				    'dataProvider'=>$model->search(16),  
				    'itemView'=>'_list_view',    
				    'emptyText'=>$emptyText,  
				    'pager'=>array('class'=>'CLinksPager'),
					'cssFile'=>'/css/yii-list-view/styles_h.css',
					'htmlOptions'=>array('class'=>'list c_f list-view list_hover'),
					'itemsTagName'=>'ul',
					'summaryText'=>'第 {start}-{end} 条, 共<strong class="c_red2">{count}</strong> 条   第{page}页/共{pages}页',
					'pagerTemplate'=>'onlyPager',
					'buttonCssClass'=>'bg_x btn_page',
				    ));  
			?>  
        </div>
    </div>
<!--更多促销 end-->

<div class="allsort_nav promotion_sort bg_fff">
    <h2 class="ff_yh fs_15">促销分类</h2>
    <ul>
    	<?php foreach($cateTop as $key=>$cate){?>
			<li><?php echo CHtml::link('<b class="ico ico_sort'.($key+1).'"></b>'.CHtml::encode($cate->zca_title),array('list','id'=>$cate->zca_id))?></li>
		<?php }?>
    </ul>
    <p class="view_all t_c">
    	<?php echo CHtml::link('查看全部促销',array('list','id'=>''),array('alt'=>'查看全部促销'))?>
    </p>	
</div>

<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style/style_promotion.css" rel="stylesheet" type="text/css" />

